package com.patternsbox.behavioral.interpreter;

import java.util.ArrayList;
import java.util.List;

import com.patternsbox.ActionTemplate;

public class InterpreterAction extends ActionTemplate {

	public void doAction() {
		Context context = new Context();
		// Usually a tree
		List<AbstractExpression> list = new ArrayList<AbstractExpression>();
		// Populate 'abstract syntax tree'
		list.add(new TerminalExpression());
		list.add(new NonterminalExpression());
		list.add(new TerminalExpression());
		list.add(new TerminalExpression());
		// Interpret
		for (AbstractExpression exp : list) {
			exp.interpret(context);
		}
	}
}
